<script setup>
import EchartsMap from "../../components/home/EchartsMap.vue"
import BuildingList from "../../components/home/BuildingList.vue"
import LineChart from "../../components/echarts/LineChart.vue"
import BarChart from "../../components/echarts/BarChart.vue"
import RadarChart from "../../components/echarts/RadarChart.vue"
import PieChart from "../../components/echarts/PieChart.vue"
</script>

<template>
  <div class="dashboard">
    <div class="main-content">
      <div class="chart-group">
        <div class="chart-section">
          <BuildingList></BuildingList>
        </div>
        <div class="chart-section">
          <LineChart></LineChart>
        </div>
      </div>
      <div class="map-section">
        <EchartsMap></EchartsMap>
      </div>
      <div class="chart-group">
        <div class="chart-section">
          <BarChart></BarChart>
        </div>
        <div class="chart-section">
          <RadarChart></RadarChart>
        </div>
      </div>
    </div>
    <div class="footer">
      <ul>
        <li><PieChart></PieChart></li>
        <li><RadarChart></RadarChart></li>
        <li><BarChart></BarChart></li>
        <li><LineChart></LineChart></li>
      </ul>
    </div>
  </div>
</template>

<style scoped lang="scss">
.dashboard {
  width: 100%;
  height: 100%;
  padding: 10px;

  .main-content {
    display: flex;
    margin-bottom: 10px;
    height: 64%;

    .chart-group {
      width: 22%;
      height: 100%;
      position: relative;

      .chart-section {
        height: calc(50% - 5px);
        border: 1px solid rgba(7, 118, 181, 0.5);
        box-shadow: inset 0 0 10px rgba(7, 118, 181, 0.4);
        position: relative;
        &::before {
          width: 100%;
          height: 1px;
          content: "";
          position: absolute;
          left: 0;
          top: -1px;
          background: linear-gradient(to right, #076ead, #4ba6e0, #076ead);
          box-shadow: 0 0 5px rgba(131, 189, 227, 1);
          opacity: 0.6;
        }
      }
      .chart-section:first-child {
        margin-bottom: 10px;
      }
    }

    .map-section {
      width: calc(100% - 42% - 20px);
      height: 100%;
      margin: 0 10px;
      border: 1px solid rgba(7, 118, 181, 0.5);
      box-shadow: inset 0 0 10px rgba(7, 118, 181, 0.4);
      background: url(../../assets/images/bg.png) no-repeat center center;
      background-size: 100% 100%;
      position: relative;
      &::before {
        width: 100%;
        height: 1px;
        content: "";
        position: absolute;
        left: 0;
        top: -1px;
        background: linear-gradient(to right, #076ead, #4ba6e0, #076ead);
        box-shadow: 0 0 5px rgba(131, 189, 227, 1);
        opacity: 0.6;
      }
    }
  }

  .footer {
    height: calc(100% - 64% - 10px);
    border: 1px solid rgba(7, 118, 181, 0.5);
    box-shadow: inset 0 0 10px rgba(7, 118, 181, 0.4);
    padding: 10px;
    position: relative;
    &::before {
      width: 100%;
      height: 1px;
      content: "";
      position: absolute;
      left: 0;
      top: -1px;
      background: linear-gradient(to right, #076ead, #4ba6e0, #076ead);
      box-shadow: 0 0 5px rgba(131, 189, 227, 1);
      opacity: 0.6;
    }

    ul {
      width: 100%;
      height: 100%;
      display: flex;
      li {
        width: 25%;
        height: 100%;
        border-right: 1px solid rgba(7, 118, 181, 0.2);
        &:last-child {
          border-right: none;
        }
      }
    }
  }
}
</style>
